package com.dmp.onlinestore.model.dto;

public class ProductBeanFilterSpec {
	
    // Match on anything.
	public static int INT_MATCH_ANY       = -1;
	public static String STRING_MATCH_ANY = "";

    // Allowed sorts. NOT CURRENTLY IMPLEMENTED!!
	public static int SORT_BY_NONE             = 0;
	public static int SORT_BY_PRICE_ASCENDING  = 1;
	public static int SORT_BY_PRICE_DESCENDING = 2;

	private String catMatch    = STRING_MATCH_ANY;
	private String subcatMatch = STRING_MATCH_ANY;
	private int sortMethod     = SORT_BY_NONE;
	
	private ProductBeanFilterSpec() {
	}
	
	// Default (plain) filter.
	public static ProductBeanFilterSpec getDefaultFilter() {
	    return new ProductBeanFilterSpec();
	}

	public String getCatMatch() {
		return catMatch;
	}

	public void setCatMatch(String catMatch) {
		this.catMatch = catMatch;
	}

	public String getSubcatMatch() {
		return subcatMatch;
	}

	public void setSubcatMatch(String subcatMatch) {
		this.subcatMatch = subcatMatch;
	}

	public int getSortMethod() {
		return sortMethod;
	}

	public void setSortMethod(int sortMethod) {
		this.sortMethod = sortMethod;
	}
	
}
